<?php
include "../../../include/qianwe.conn.php";
$action=SafeRequest("ac","get");
$CD_ID=SafeRequest("id","get");

	global $db;
	$sql="Select CD_Name,CD_Url,CD_Server,CD_Singer from ".tname('music')." where CD_ID=".$CD_ID."";
	$row=$db->getrow($sql);
	$server=$db->getrow("select * from ".tname('server')." where CD_ID=".$row['CD_Server']."");
	if($row){
		$CD_Url=$row['CD_Url'];
		if(left($CD_Url,18)=="http://www.rayfile"){
			$playurl=getrayfile($CD_Url,$row['CD_Name']);
		}elseif(left($CD_Url,17)=="http://disk.kugou"){
			$playurl=getkugou($CD_Url);
		}else{
			$playurl=$server['CD_Url'].$CD_Url;
		}

		if($action=="lplay"){
			echo  'var i'.$CD_ID.'="'.$CD_ID.'";var s'.$CD_ID.'="'.$row['CD_Singer'].'";var n'.$CD_ID.'="'.$row['CD_Name'].'";var u'.$CD_ID.'="'.$playurl.'";var t'.$CD_ID.'="'.$row['CD_ClassID'].'";';
		}else{
			echo '<list><m src="'.$playurl.'" label="'.$row['CD_Name'].' - '.$row['CD_Singer'].'"/></list>';
		}
	}
?>